<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .a{

        }
        .b{

        }
        .c{

        }
    </style>
    <script src="../../lib/vue.js"></script>
</head>
<body>
    <div id="box">
        <div :class="classObj">
            动态切换class-对象写法
        </div>
        <div :class="classArr">
            动态切换class-数组写法
        </div>
        <div style="background-attachment: red;">静态行内样式</div>
    </div>

    <script>
        new Vue({
            el:"#box",
            data: {
                classObj: {
                    a: true,
                    b: true,
                    c: true
                },
                classArr: [
                    "a","b","c"
                ]
            }
        })
    </script>
</body>
</html>